using System;
using SqlSugar;

namespace SiemensAmd.Mmt.DevQt
{
	/// <summary>
	/// 刀库配置
	/// </summary>
	[SugarTable("tool_mag_config")]
	public class ToolMagConfigEntity
	{
		[SugarColumn(ColumnName = "fmc_no")]
		public string FMCNo { get; set; }

		[SugarColumn(ColumnDescription = "设备名称", ColumnName = "device_no")]
		public string DeviceNo { get; set; }

		[SugarColumn(ColumnDescription = "全局ID(mmt)", ColumnName = "global_id")]
		public string GlobalId { get; set; }

		[SugarColumn(ColumnDescription = "刀库名称", ColumnName = "mag_ident")]
		public string MagIdent { get; set; }

		[SugarColumn(IsIgnore = true)]
		public string MagKindDescribe => this.MagKind switch
		{
			1 => "链式刀库", 
			3 => "塔式刀库", 
			5 => "平面刀库", 
			7 => "内部刀库", 
			9 => "内部加载站", 
			_ => this.MagKind.ToString(), 
		};

		[SugarColumn(ColumnDescription = "刀库编号", ColumnName = "mag_no")]
		public int MagNo { get; set; }

		[SugarColumn(ColumnDescription = "刀库类型", ColumnName = "mag_kind")]
		public int MagKind { get; set; }

		[SugarColumn(ColumnDescription = "刀库尺寸(行)", ColumnName = "mag_dim")]
		public int MagDim { get; set; }

		[SugarColumn(ColumnDescription = "刀库尺寸(列)", ColumnName = "mag_dim2")]
		public int MagDim2 { get; set; }

		[SugarColumn(ColumnDescription = "刀位数量", ColumnName = "mag_nr_places")]
		public int MagNrPlaces { get; set; }

		[SugarColumn(ColumnName = "time_stamp")]
		public DateTime TimeStamp { get; set; }
	}
}
